package aures.main;

import aures.plugins.sysPlugin;
import aures.ui.*;

public class Aures {

	public static void main(String[] args) {

		AuresGui gui = new AuresGui();
		AuresLogin login;
		AuresMain main;
		AuresStdio pserver;
		AuresLobby plobby;
		
		gui.Init(args);
		
		try{
			
			login = new AuresLogin("../gui/login.glade", "WinLogin");
			login.build();
			login.Show();
			
			main = new AuresMain("../gui/main.glade",	"WinMain");
			
			pserver = new AuresStdio("../gui/server.glade", "ServerTabBox", "#Server");
			sysPlugin.setStdio(pserver);
			plobby = new AuresLobby("../gui/lobby.glade", "LobbyBox", "#Lobby");
			
			main.addPage(pserver);
			main.addPage(plobby);
			/* for rendering evaluation purpose ! */
			main.addPage(new AuresTable("../gui/body.glade"
						, "TabBodyBox", "#Saloon"));
			
			main.build();
			main.Show();
			
    		sysPlugin.initialize();
    		sysPlugin.loadPlugins("../script/");
    		sysPlugin.dumpPlugins();
			
			gui.Loop();
			
		}catch (Exception e){
			e.printStackTrace();
		}
		
		
		
	}

}
